package com.ymatou.idcard.api.testcase;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.ymatou.idcard.api.parameter.GetCurrentCardByReceiveBean;
import com.ymatou.idcard.api.service.GetCurrentCardByReceiveCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.TestCase;
import com.ymt.utils.annotation.TestSuite;
import com.ymt.utils.tag.P1;

/**
 * 查询当前收件人身份证号接口 FreeMaker Template自动生成代码
 */
@TestSuite
public class Ts_GetCurrentCardByReceive {
	private static GetCurrentCardByReceiveBean currentCardBean;
	private static GetCurrentCardByReceiveCall currentCardCall;

	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("查询当前收件人身份证号接口");
	}

	@Before
	public void caseUp() {
		currentCardBean = new GetCurrentCardByReceiveBean();
		currentCardCall = new GetCurrentCardByReceiveCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(currentCardCall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_GetCurrentCardByReceive_001() {
		Logger.start(true,"查询当前收件人身份证号成功");
		try {
			currentCardBean.setBuyerId("106");
			currentCardBean.setName("大姐大姐");
			currentCardBean.setIsCheckLocal(false);
			currentCardBean.setIsNeedPic(true);
			currentCardBean.setMobile("13365959457");

			currentCardCall.setData(currentCardBean);
			currentCardCall.callService();

			Logger.comment("请求报文:" + currentCardCall.getEntityString());
			Logger.comment("返回报文:" + currentCardCall.getReturnData());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}